﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _20161203
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;
        }

        private void 产生异常_Click(object sender, EventArgs e)
        {
            int length = txtString.Text.Length;
            MessageBox.Show("字符串总长度为:"+length);
        }
    }
}
